<?php
class lang{
    protected static $lang=array();
    
    public static function t($name){
        if(!defined('PROJECT_LANG')) return '';
        
        if(!array_key_exists(PROJECT_LANG,self::$lang)){
            self::$lang[PROJECT_LANG]=array_merge(include(P_LANG.PROJECT_LANG.'.php'),include(LANG_DIR.PROJECT_LANG.'.php'));
        }
        if($name=='*') return self::$lang[PROJECT_LANG];
        
        return self::$lang[PROJECT_LANG][$name];
    }
    
}